<?php
/*
###########################################################################
#                                  KALMAR                                 #
#                      http://akkar.sourceforge.net/                      #
#                                                                         #
#                            -------------------                          #
#                                footer.php                               #
#                            -------------------                          #
#                                                                         #
#   copyright (C) 2004 Roy W. Andersen                                    #
#   email: ensnared@gmail.com                                             #
#                                                                         #
###########################################################################

###########################################################################
#                                                                         #
#  This program is free software; you can redistribute it and/or modify   #
#  it under the terms of the GNU General Public License as published by   #
#  the Free Software Foundation; either version 2 of the License, or      #
#  (at your option) any later version.                                    #
#                                                                         #
###########################################################################
*/
if (!defined('IN_KALMAR')) {
	exit('Access violation.');
}

if ($_REQUEST['utskrift']) {
	include('printfooter.php');
} elseif ($_REQUEST['infowindow']) {
	include('infofooter.php');
} else {
	if (is_file(AKKARDIR.'/styles/'.$config['style'].'/mainfooter.php')) {
		$footer = file_get_contents(AKKARDIR.'/styles/'.$config['style'].'/mainfooter.php');
		$footer = str_replace('is_file(\'styles', 'is_file(AKKARDIR.\'/styles', $footer);
		$footer = str_replace('href="styles', 'href="\'.AKKARURL.\'/styles', $footer);
		$footer = str_replace('IN_AKKAR', 'IN_KALMAR', $footer);
		$footer = str_replace('akkar26.png', 'kalmar26.png', $footer);
		$footer = str_replace('AKKAR', 'KALMAR', $footer);
		
		$fp = fopen('tmp/footer.php', w);
		fputs($fp, $footer);
		fclose($fp);
		include('tmp/footer.php');
		unlink('tmp/footer.php');
		unset($footer);
		
	} else {
		include('mainfooter.php');
	}
}
ob_end_flush();
?>